package com.bw.goods.mvvm.model;

import com.bw.mvvm_common.entity.BaseEntity;
import com.bw.mvvm_common.mvvm.model.BaseModel;
import com.bw.mvvm_common.mvvm.network.HttpEnum;
import com.bw.mvvm_common.mvvm.network.HttpFactory;

import java.util.HashMap;

import io.reactivex.Observable;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/10/20 0020 下午 7:24
 *
 */
class HomeValuesModel extends BaseModel {
    public Observable<BaseEntity> requestGoodDetail (HashMap<String,Object> map) {
        map.remove("detail");
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign).getRetrofit()
        .create(Api.class).requestGoodDetail(createBoday(map)));
    }
    public Observable<BaseEntity> requestGoods(HashMap<String,Object> map){
        map.remove("goods");
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign).getRetrofit()
                .create(Api.class).requestHomeGoods(createBoday(map)));
    }
    public Observable<BaseEntity> requestshopcar(HashMap<String,Object> map){
        map.remove("car");
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign).getRetrofit()
                .create(Api.class).requestGoodcart(createBoday(map)));
    }
}
